import { ComponentProps, VueComponent } from "vue3-oop"
import { Divider } from 'ant-design-vue';
import { WidgetNode } from '../../types'
import { DIVIDER } from "./attr-divider";

interface IProps {
  widgetNode: WidgetNode
}
export default class FvrDivider extends VueComponent<IProps> {
  static defaultProps: ComponentProps<IProps> = {
    widgetNode: {}
  }

  constructor(
  ) {
    super();
  }

  render() {
    const { widgetNode } = this.props;
    const { widgetItem } = widgetNode;
    const attr = widgetItem.DIVIDER as DIVIDER;

    return (
      <Divider>{attr.label}</Divider>
    )
  }
}